#include<stdio.h>
#include<stdlib.h>
#include<time.h>

#define N 32
#define RNDL 0
#define RNDH 32

struct student
{
    char name[48];
    int number;
};

int main()
{
    freopen("list.txt", "r", stdin);

    int i;
    struct student arr[N] = {0};

    for(i = 0; i < N; i++)
    {
        scanf("%s %d", arr[i].name, &arr[i].number);
    }

    freopen("CON", "r", stdin);

    int random_1, random_2;
    srand(time(NULL));

    i = 1;
    do
    {
        random_1 = (rand() % (RNDH - RNDL)) + RNDL;

        printf("The %d lucky dog is %s!\n", i, arr[random_1].name);

        random_2 = (rand() % (RNDH - RNDL)) + RNDL;
        if(random_1 == random_2)
        {
            continue;
        }
        else
        {
            random_1 = random_2;
            i++;
        }
    }while(i < 6);

    return 0;
}

